package patten.xingwei.state;

/**
 * Description：角色状态抽象类
 * Author：zwenzhi
 * Date：2023/10/26 16:42
 */
public abstract class CharacterState {
    //角色类
    protected Character character;

    public CharacterState(Character character) {
        this.character = character;
    }

    //处理攻击逻辑
    abstract void handleAttack();
    //处理受伤逻辑
    abstract void handleDamage(int damage);
    //处理治疗逻辑
    abstract void handleHeal(int healing);

    public Character getCharacter() {
        return character;
    }

    public void setCharacter(Character character) {
        this.character = character;
    }

    public void setStatus(Character character) {
        this.character = character;
    }
}
